﻿using System;

namespace Dexter.Scheduler {
	/// <summary>
	/// The contract base for the trigger manager.
	/// </summary>
	public interface IScheduler {
		/// <summary>
		/// Adds the specified <see cref="IJob"/>.
		/// </summary>
		/// <param name="job">The job.</param>
		void AddJob ( IJob job );

		/// <summary>
		/// Removes the specified <see cref="IJob"/>.
		/// </summary>
		/// <param name="job">The job.</param>
		void RemoveJob ( IJob job );

		/// <summary>
		/// Starts the scheduler.
		/// </summary>
		void StartScheduler ( );

		/// <summary>
		/// Starts the scheduler.
		/// </summary>
		/// <param name="delay">The delay.</param>
		void StartScheduler (TimeSpan delay );

		/// <summary>
		/// Stops the scheduler.
		/// </summary>
		void StopScheduler ( );

		/// <summary>
		/// Determines whether this scheduler is started.
		/// </summary>
		/// <returns>
		/// 	<c>true</c> if this scheduler is started; otherwise, <c>false</c>.
		/// </returns>
		bool IsStarted ( );
	}
}
